home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 1.0 for Developers / QuickTime 1.0 for Developers.iso / Programming Stuff / Interfaces / Movies Interfaces / ImageCompression.h < prev    next >
C/C++ Source or Header  |  1991-09-06  |  23KB  |  528 lines

  1.  
  2. /************************************************************
  3.  
  4. Created: Tuesday, August 13, 1991 at 4:25 PM
  5.  ImageCompression.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.  Copyright Apple Computer, Inc. 1991
  10.  All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __IMAGECOMPRESSION__
  16. #define __IMAGECOMPRESSION__
  17.  
  18. #ifndef __QUICKDRAW__
  19. #include <QuickDraw.h>
  20. #endif
  21.  
  22. #ifndef __QDOFFSCREEN__
  23. #include <QDOffscreen.h>
  24. #endif
  25.  
  26. #ifndef __TYPES__
  27. #include <Types.h>
  28. #endif
  29.  
  30. #ifndef __COMPONENTS__
  31. #include <Components.h>
  32. #endif
  33.  
  34.  
  35. enum {
  36.  
  37.  
  38. #define gestaltCompressionMgr 'icmp'
  39.  
  40. /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
  41.  
  42. #define codecInfoDoes1 (1L<<0)                        /* codec can work with 1-bit pixels */
  43. #define codecInfoDoes2 (1L<<1)                        /* codec can work with 2-bit pixels */
  44. #define codecInfoDoes4 (1L<<2)                        /* codec can work with 4-bit pixels */
  45. #define codecInfoDoes8 (1L<<3)                        /* codec can work with 8-bit pixels */
  46. #define codecInfoDoes16 (1L<<4)                        /* codec can work with 16-bit pixels */
  47. #define codecInfoDoes32 (1L<<5)                        /* codec can work with 32-bit pixels */
  48. #define codecInfoDoesDither (1L<<6)                    /* codec can do ditherMode */
  49. #define codecInfoDoesStretch (1L<<7)                /* codec can stretch to arbitrary sizes */
  50. #define codecInfoDoesShrink (1L<<8)                    /* codec can shrink to arbitrary sizes */
  51. #define codecInfoDoesMask (1L<<9)                    /* codec can mask to clipping regions */
  52.  
  53. #define codecInfoDoesTemporal (1L<<10)                /* codec can handle temporal redundancy */
  54.  
  55. #define codecInfoDoesDouble (1L<<11)                /* codec can stretch to double size exactly */
  56. #define codecInfoDoesQuad (1L<<12)                    /* codec can stretch to quadruple size exactly */
  57. #define codecInfoDoesHalf (1L<<13)                    /* codec can shrink to half size */
  58. #define codecInfoDoesQuarter (1L<<14)                /* codec can shrink to quarter size */
  59.  
  60. #define codecInfoDoesRotate (1L<<15)                /* codec can rotate on decompress */
  61. #define codecInfoDoesHorizFlip (1L<<16)                /* codec can flip horizontally on decompress */
  62. #define codecInfoDoesVertFlip (1L<<17)                /* codec can flip vertically on decompress */
  63. #define codecInfoDoesSkew (1L<<18)                    /* codec can skew on decompress */
  64. #define codecInfoDoesBlend (1L<<19)                    /* codec can blend on decompress */
  65. #define codecInfoDoesWarp (1L<<20)                    /* codec can warp arbitrarily on decompress */
  66. #define codecInfoDoesRecompress (1L<<21)            /* codec can recompress image without accumulating errors */
  67.  
  68. #define codecInfoDepth1 (1L<<0)                        /* compressed data at 1 bpp depth available */
  69. #define codecInfoDepth2 (1L<<1)                        /* compressed data at 2 bpp depth available */
  70. #define codecInfoDepth4 (1L<<2)                        /* compressed data at 4 bpp depth available */
  71. #define codecInfoDepth8 (1L<<3)                        /* compressed data at 8 bpp depth available */
  72. #define codecInfoDepth16 (1L<<4)                    /* compressed data at 16 bpp depth available */
  73. #define codecInfoDepth32 (1L<<5)                    /* compressed data at 32 bpp depth available */
  74. #define codecInfoDepth24 (1L<<6)                    /* compressed data at 24 bpp depth available */
  75. #define codecInfoDepth33 (1L<<7)                    /* compressed data at 1 bpp monochrome depth  available */
  76. #define codecInfoDepth34 (1L<<8)                    /* compressed data at 2 bpp grayscale depth available */
  77. #define codecInfoDepth36 (1L<<9)                    /* compressed data at 4 bpp grayscale depth available */
  78. #define codecInfoDepth40 (1L<<10)                    /* compressed data at 8 bpp grayscale depth available */
  79. #define codecInfoStoresClut (1L<<11)                /* compressed data can have custom cluts */
  80.  
  81. #define codecFlagUseImageBuffer (1L<<0)                /* (input) allocate buffer for whole image on decompress sequence */
  82. #define codecFlagUseScreenBuffer (1L<<1)            /* (input) allocate buffer for screen on decompress sequence for faster updates */
  83. #define codecFlagUpdatePrevious (1L<<2)                /* (input) udate previous buffer on compress sequence */
  84. #define codecFlagNoScreenUpdate (1L<<3)                /* (input) dont update screen, but do update image buffer if allocated */
  85. #define codecFlagWasCompressed (1L<<4)                /* (input) hint to compressor that image was previously compressed */
  86. #define codecFlagDontOffscreen (1L<<5)                /* return error instead of automatically going offscreen */
  87. #define codecFlagUpdatePreviousComp (1L<<6)            /* (input) udate previous buffer on compress sequence */
  88. #define codecFlagForceKeyFrame (1L<<7)                /* when sent to CompressSequenceFrame, forces that frame to be a key frame */
  89.  
  90. #define codecFlagUsedImageBuffer (1L<<15)            /* (output) indicates that image buffer was used on this decompress sequence */
  91.  
  92. #define codecErr -8960                                /* the codec returned an error */
  93. #define noCodecErr -8961                            /* the specified codec could not be found */
  94. #define codecUnimpErr -8962                            /* this feature is not implemented by the specified codec */
  95. #define codecSizeErr -8963
  96. #define codecScreenBufErr -8964                        /* the screen buffer could not be allocated */
  97. #define codecImageBufErr -8965                        /* the image buffer could not be allocated */
  98. #define codecSpoolErr -8966                            /* the compressed data must be in memory (spooling did not work) */
  99. #define codecAbortErr -8967                            /* the operation was aborted by the progress proc */
  100. #define codecWouldOffscreenErr -8968                /* an offscreen access would have been used, but wasn't allowed because codecFlagDontOffscreen was set */
  101. #define codecBadDataErr -8969                        /* compressed data was found to have inconsistencies */
  102. #define codecDataVersErr -8970                        /* compressed data was of a format version that codec couldn't handle */
  103.  
  104.  
  105.  codecMinimumDataSize = 16384                        /* The minimum data size for spooling in or out data */
  106.  
  107.  
  108. #define compressorComponentType 'imco'                /* the type for "Components" which compress images */
  109. #define decompressorComponentType 'imdc'            /* the type for "Components" which decompress images */
  110. };
  111.  
  112. typedef Component CompressorComponent;                /* a Component which compresses images */
  113. typedef Component DecompressorComponent;            /* a Component which decompresses images */
  114. typedef Component CodecComponent;                    /* a Component which decompresses or compresses images */
  115.  
  116.  
  117.  
  118.  
  119. #define anyCodec ((CodecComponent)0)                /* take first working codec of given type */
  120. #define bestSpeedCodec ((CodecComponent)-1)            /* take fastest codec of given type */
  121. #define bestFidelityCodec ((CodecComponent)-2)        /* take codec which is most accurate*/
  122. #define bestCompressionCodec ((CodecComponent)-3)    /* take codec of given type that is most accurate */
  123.  
  124.  
  125. typedef short sBoolean;                                /* to make sure stack frames are right */
  126.  
  127. typedef long CodecType;                                /* type descriptor for codecs i.e: 'appl','jpeg','rle ' */
  128.  
  129. typedef unsigned short CodecFlags;                    /* flags for codec manager calls */
  130.  
  131. typedef unsigned long CodecQ;
  132.  
  133.  
  134.  
  135.  
  136. #define codecLosslessQuality 0x400L
  137. #define codecMaxQuality 0x3FFL
  138. #define codecMinQuality 0x000L
  139. #define codecLowQuality 0x100L
  140. #define codecNormalQuality 0x200L
  141. #define codecHighQuality 0x300L
  142.  
  143. typedef pascal OSErr (*DataProcPtr)(Ptr *dataP,long bytesNeeded,long refCon);  
  144. typedef pascal OSErr (*FlushProcPtr)(Ptr data,long bytesAdded,long refCon);
  145.  
  146.  
  147.  
  148.  
  149. #define codecCompletionSource (1<<0)
  150. #define codecCompletionDest (1<<1)
  151.  
  152. typedef pascal void (*CompletionProcPtr)(OSErr result,short flags,long refCon);
  153.  
  154. enum {
  155.  
  156.  codecProgressOpen = 0,
  157.  codecProgressUpdatePercent = 1,
  158.  codecProgressClose = 2
  159. };
  160.  
  161. typedef pascal OSErr (*ProgressProcPtr)(short message,Fixed completeness,long refCon);
  162.  
  163. typedef long ImageSequence;
  164.  
  165. struct ProgressProcRecord {
  166.  ProgressProcPtr progressProc;
  167.  long progressRefCon;
  168. };
  169.  
  170. typedef struct ProgressProcRecord ProgressProcRecord;
  171. typedef ProgressProcRecord *ProgressProcRecordPtr;
  172.  
  173. struct CompletionProcRecord {
  174.  CompletionProcPtr completionProc;
  175.  long completionRefCon;
  176. };
  177.  
  178. typedef struct CompletionProcRecord CompletionProcRecord;
  179. typedef CompletionProcRecord *CompletionProcRecordPtr;
  180.  
  181. struct DataProcRecord {
  182.  DataProcPtr dataProc;
  183.  long dataRefCon;
  184. };
  185.  
  186. typedef struct DataProcRecord DataProcRecord;
  187. typedef DataProcRecord *DataProcRecordPtr;
  188.  
  189. struct FlushProcRecord {
  190.  FlushProcPtr flushProc;
  191.  long flushRefCon;
  192. };
  193.  
  194. typedef struct FlushProcRecord FlushProcRecord;
  195. typedef FlushProcRecord *FlushProcRecordPtr;
  196.  
  197. /* 
  198.     The ImageDescription is private data which is produced when an image or sequence 
  199.     is compressed. It fully describes the format of the compressed data.*/
  200.  
  201. struct ImageDescription {
  202.  long idSize;                                        /* total size of ImageDescription including extra data ( CLUTs and other per sequence data */
  203.  CodecType cType;                                    /* what kind of codec compressed this data */
  204.  long resvd1;                                        /* reserved for apple use */
  205.  short resvd2;                                        /* reserved for apple use */
  206.  short dataRefIndex;                                /* set to zero */
  207.  short version;                                        /* which version is this data */
  208.  short revisionLevel;                                /* what version of that codec did this */
  209.  long vendor;                                        /* whose  codec compressed this data */
  210.  CodecQ temporalQuality;                            /* what was the temporal quality factor          */
  211.  CodecQ spatialQuality;                                /* what was the spatial quality factor          */
  212.  short width;                                        /* how many pixels wide is this data */
  213.  short height;                                        /* how many pixels high is this data */
  214.  Fixed hRes;                                        /* horizontal resolution */
  215.  Fixed vRes;                                        /* vertical resolution */
  216.  long dataSize;                                        /* if known, the size of data for this image descriptor */
  217.  short frameCount;                                    /* number of frames this description applies to */
  218.  char name[32];                                        /* name of codec ( in case not installed ) */
  219.  short depth;                                        /* what depth is this data (1-32) or ( 33-40 grayscale ) */
  220.  short clutID;                                        /* clut id or if 0 clut follows  or -1 if no clut */
  221. };
  222.  
  223. typedef struct ImageDescription ImageDescription;
  224. typedef ImageDescription *ImageDescriptionPtr, **ImageDescriptionHandle;
  225.  
  226. /* 
  227.     The CodecInfo is the information returned as the codecInfo struct by a codec Component
  228.     to the codec manager or to the caller. It is specific to the particular codec
  229.     implementation and not to the codec type.*/
  230.  
  231. struct CodecInfo {
  232.  char typeName[32];                                    /* name of the codec type i.e.: 'Apple Image Compression' */
  233.  short version;                                        /* version of the codec data that this codec knows about */
  234.  short revisionLevel;                                /* revision level of this codec i.e: 0x00010001 (1.0.1) */
  235.  long vendor;                                        /* Maker of this codec i.e: 'appl' */
  236.  long decompressFlags;                                /* codecInfo flags for decompression capabilities */
  237.  long compressFlags;                                /* codecInfo flags for compression capabilities */
  238.  long formatFlags;                                    /* codecInfo flags for compression format details */
  239.  unsigned char compressionAccuracy;                    /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
  240.  unsigned char decompressionAccuracy;                /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
  241.  unsigned short compressionSpeed;                    /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown) */
  242.  unsigned short decompressionSpeed;                    /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown) */
  243.  unsigned char compressionLevel;                    /* measure (1-255) of compression level of this codec (0 if unknown) */
  244.  char resvd;                                        /* pad */
  245.  short minimumHeight;                                /* minimum height of image (block size) */
  246.  short minimumWidth;                                /* minimum width of image (block size) */
  247.  short decompressPipelineLatency;                    /* in milliseconds ( for asynchronous codecs ) */
  248.  short compressPipelineLatency;                        /* in milliseconds ( for asynchronous codecs ) */
  249.  long privateData;
  250. };
  251.  
  252. typedef struct CodecInfo CodecInfo;
  253.  
  254. /* Table used for fast dithering. */
  255. struct DitherTable {
  256.  long tag;
  257.  long seed;
  258.  long reserved;
  259.  char data[1];
  260. };
  261.  
  262. typedef struct DitherTable DitherTable;
  263. typedef DitherTable *DTabPtr, **DTabHandle;
  264.  
  265. /* Name list returned by GetCodecNameList. */
  266. struct CodecNameSpec {
  267.  CodecComponent codec;
  268.  CodecType cType;
  269.  char typeName[32];
  270.  Handle name;
  271. };
  272.  
  273. typedef struct CodecNameSpec CodecNameSpec;
  274.  
  275. struct CodecNameSpecList {
  276.  short count;
  277.  CodecNameSpec list[1];
  278. };
  279.  
  280. typedef struct CodecNameSpecList CodecNameSpecList;
  281. typedef CodecNameSpecList *CodecNameSpecListPtr;
  282.  
  283. /*  Matrix stuff  */
  284. struct MatrixRecord {
  285.  Fixed matrix[3][3];
  286. };
  287.  
  288. typedef struct MatrixRecord  MatrixRecord;
  289. typedef MatrixRecord  *MatrixRecordPtr;
  290.  
  291. #ifndef _FixedPoint_
  292. #define _FixedPoint_
  293. struct FixedPoint {
  294.  Fixed x;
  295.  Fixed y;
  296. };
  297.  
  298. typedef struct FixedPoint FixedPoint;
  299. #endif _FixedPoint_
  300.  
  301. #ifndef _FixedRect_
  302. #define _FixedRect_
  303. struct FixedRect {
  304.  Fixed left;
  305.  Fixed top;
  306.  Fixed right;
  307.  Fixed bottom;
  308. };
  309.  
  310. typedef struct FixedRect FixedRect;
  311. #endif _FixedRect_
  312.  
  313.  
  314. #ifdef __cplusplus
  315. extern "C" {
  316. #endif
  317. pascal OSErr CodecManagerVersion(long *version)
  318.  = {0x7000,0xAAA3}; 
  319. pascal OSErr GetCodecNameList(CodecNameSpecListPtr *list,sBoolean showAll)
  320.  = {0x7001,0xAAA3}; 
  321. pascal OSErr GetCodecInfo(CodecInfo *info,CodecType cType,CodecComponent codec)
  322.  = {0x7003,0xAAA3}; 
  323. pascal OSErr GetMaxCompressionSize(PixMapHandle src,Rect *srcRect,short colorDepth,
  324.  CodecQ quality,CodecType cType,CompressorComponent codec,long *size)
  325.  = {0x7004,0xAAA3}; 
  326. pascal OSErr GetCompressionTime(PixMapHandle src,Rect *srcRect,short colorDepth,
  327.  CodecType cType,CompressorComponent codec,CodecQ *spatialQuality,CodecQ *temporalQuality,
  328.  unsigned long *compressTime)
  329.  = {0x7005,0xAAA3}; 
  330. pascal OSErr CompressImage(PixMapHandle src,Rect *srcRect,CodecQ quality,
  331.  CodecType cType,ImageDescriptionHandle desc,Ptr data)
  332.  = {0x7006,0xAAA3}; 
  333. pascal OSErr FCompressImage(PixMapHandle src,Rect *srcRect,short colorDepth,
  334.  CodecQ quality,CodecType cType,CompressorComponent codec,CTabHandle clut,
  335.  CodecFlags flags,long bufferSize,FlushProcRecordPtr flushProc,ProgressProcRecordPtr progressProc,
  336.  ImageDescriptionHandle desc,Ptr data)
  337.  = {0x7007,0xAAA3}; 
  338. pascal OSErr DecompressImage(Ptr data,ImageDescriptionHandle desc,PixMapHandle dst,
  339.  Rect *srcRect,Rect *dstRect,short mode,RgnHandle mask)
  340.  = {0x7008,0xAAA3}; 
  341. pascal OSErr FDecompressImage(Ptr data,ImageDescriptionHandle desc,PixMapHandle dst,
  342.  Rect *srcRect,MatrixRecordPtr matrix,short mode,RgnHandle mask,PixMapHandle matte,
  343.  Rect *matteRect,CodecQ accuracy,DecompressorComponent codec,long bufferSize,
  344.  DataProcRecordPtr dataProc,ProgressProcRecordPtr progressProc)
  345.  = {0x7009,0xAAA3}; 
  346. pascal OSErr CompressSequenceBegin(ImageSequence *seqID,PixMapHandle src,
  347.  PixMapHandle prev,Rect *srcRect,Rect *prevRect,short colorDepth,CodecType cType,
  348.  CompressorComponent codec,CodecQ spatialQuality,CodecQ temporalQuality,
  349.  long keyFrameRate,CTabHandle clut,CodecFlags flags,ImageDescriptionHandle desc)
  350.  = {0x700A,0xAAA3}; 
  351. pascal OSErr CompressSequenceFrame(ImageSequence seqID,PixMapHandle src,
  352.  Rect *srcRect,CodecFlags flags,Ptr data,long *dataSize,unsigned char *similarity,
  353.  CompletionProcRecordPtr asyncCompletionProc)
  354.  = {0x700B,0xAAA3}; 
  355. pascal OSErr DecompressSequenceBegin(ImageSequence *seqID,ImageDescriptionHandle desc,
  356.  CGrafPtr port,GDHandle gdh,Rect *srcRect,MatrixRecordPtr matrix,short mode,
  357.  RgnHandle mask,CodecFlags flags,CodecQ accuracy,DecompressorComponent codec)
  358.  = {0x700D,0xAAA3}; 
  359. pascal OSErr DecompressSequenceFrame(ImageSequence seqID,Ptr data,CodecFlags inFlags,
  360.  CodecFlags *outFlags,CompletionProcRecordPtr asyncCompletionProc)
  361.  = {0x700E,0xAAA3}; 
  362. pascal OSErr SetDSequenceMatrix(ImageSequence seqID,MatrixRecordPtr matrix)
  363.  = {0x7010,0xAAA3}; 
  364. pascal OSErr SetDSequenceMatte(ImageSequence seqID,PixMapHandle matte,Rect *matteRect)
  365.  = {0x7011,0xAAA3}; 
  366. pascal OSErr SetDSequenceMask(ImageSequence seqID,RgnHandle mask)
  367.  = {0x7012,0xAAA3}; 
  368. pascal OSErr SetDSequenceTransferMode(ImageSequence seqID,short mode,RGBColor *opColor)
  369.  = {0x7013,0xAAA3}; 
  370. pascal OSErr SetDSequenceDataProc(ImageSequence seqID,DataProcRecordPtr dataProc,
  371.  long bufferSize)
  372.  = {0x7014,0xAAA3}; 
  373. pascal OSErr SetDSequenceAccuracy(ImageSequence seqID,CodecQ accuracy)
  374.  = {0x7034,0xAAA3}; 
  375. pascal OSErr SetDSequenceSrcRect(ImageSequence seqID,Rect *srcRect)
  376.  = {0x7035,0xAAA3}; 
  377. pascal OSErr GetDSequenceImageBuffer(ImageSequence seqID,GWorldPtr *gworld)
  378.  = {0x7015,0xAAA3}; 
  379. pascal OSErr GetDSequenceScreenBuffer(ImageSequence seqID,GWorldPtr *gworld)
  380.  = {0x7016,0xAAA3}; 
  381. pascal OSErr SetCSequenceQuality(ImageSequence seqID,CodecQ spatialQuality,
  382.  CodecQ temporalQuality)
  383.  = {0x7017,0xAAA3}; 
  384. pascal OSErr SetCSequencePrev(ImageSequence seqID,PixMapHandle prev,Rect *prevRect)
  385.  = {0x7018,0xAAA3}; 
  386. pascal OSErr SetCSequenceFlushProc(ImageSequence seqID,FlushProcRecordPtr flushProc,
  387.  long bufferSize)
  388.  = {0x7033,0xAAA3}; 
  389. pascal OSErr SetCSequenceKeyFrameRate(ImageSequence seqID,long keyframerate)
  390.  = {0x7036,0xAAA3}; 
  391. pascal OSErr GetCSequencePrevBuffer(ImageSequence seqID,GWorldPtr *gworld)
  392.  = {0x7019,0xAAA3}; 
  393. pascal OSErr CDSequenceBusy(ImageSequence seqID)
  394.  = {0x701A,0xAAA3}; 
  395. pascal OSErr CDSequenceEnd(ImageSequence seqID)
  396.  = {0x701B,0xAAA3}; 
  397. pascal OSErr GetCompressedImageSize(ImageDescriptionHandle desc,Ptr data,
  398.  long bufferSize,DataProcRecordPtr dataProc,long *dataSize)
  399.  = {0x701C,0xAAA3}; 
  400. pascal OSErr GetSimilarity(PixMapHandle src,Rect *srcRect,ImageDescriptionHandle desc,
  401.  Ptr data,Fixed *similarity)
  402.  = {0x701D,0xAAA3}; 
  403. pascal OSErr GetImageDescriptionCTable(ImageDescriptionHandle desc,CTabHandle *ctable)
  404.  = {0x701E,0xAAA3}; 
  405. pascal OSErr SetImageDescriptionCTable(ImageDescriptionHandle desc,CTabHandle ctable)
  406.  = {0x701F,0xAAA3}; 
  407. pascal OSErr GetImageDescriptionExtension(ImageDescriptionHandle desc,Handle *extension,
  408.  long idType,long index)
  409.  = {0x7020,0xAAA3}; 
  410. pascal OSErr SetImageDescriptionExtension(ImageDescriptionHandle desc,Handle extension,
  411.  long idType)
  412.  = {0x7021,0xAAA3}; 
  413. pascal OSErr FindCodec(CodecType cType,CodecComponent specCodec,CompressorComponent *compressor,
  414.  DecompressorComponent *decompressor)
  415.  = {0x7023,0xAAA3}; 
  416. pascal OSErr CompressPicture(PicHandle srcPicture,PicHandle dstPicture,
  417.  CodecQ quality,CodecType cType)
  418.  = {0x7024,0xAAA3}; 
  419. pascal OSErr FCompressPicture(PicHandle srcPicture,PicHandle dstPicture,
  420.  short colorDepth,CTabHandle clut,CodecQ quality,sBoolean doDither,sBoolean compressAgain,
  421.  ProgressProcRecordPtr progressProc,CodecType cType,CompressorComponent codec)
  422.  = {0x7025,0xAAA3}; 
  423. pascal OSErr CompressPictureFile(short srcRefNum,short dstRefNum,CodecQ quality,
  424.  CodecType cType)
  425.  = {0x7026,0xAAA3}; 
  426. pascal OSErr FCompressPictureFile(short srcRefNum,short dstRefNum,short colorDepth,
  427.  CTabHandle clut,CodecQ quality,sBoolean doDither,sBoolean compressAgain,
  428.  ProgressProcRecordPtr progressProc,CodecType cType,CompressorComponent codec)
  429.  = {0x7027,0xAAA3}; 
  430. pascal OSErr GetPictureFileHeader(short refNum,Rect *frame,OpenCPicParams *header)
  431.  = {0x7028,0xAAA3}; 
  432. pascal OSErr DrawPictureFile(short refNum,Rect *frame,ProgressProcRecordPtr progressProc)
  433.  = {0x7029,0xAAA3}; 
  434. pascal OSErr DrawTrimmedPicture(PicHandle srcPicture,Rect *frame,RgnHandle trimMask,
  435.  sBoolean doDither,ProgressProcRecordPtr progressProc)
  436.  = {0x702E,0xAAA3}; 
  437. pascal OSErr DrawTrimmedPictureFile(short srcRefnum,Rect *frame,RgnHandle trimMask,
  438.  sBoolean doDither,ProgressProcRecordPtr progressProc)
  439.  = {0x702F,0xAAA3}; 
  440. pascal OSErr MakeThumbnailFromPicture(PicHandle picture,short colorDepth,
  441.  PicHandle thumbnail,ProgressProcRecordPtr progressProc)
  442.  = {0x702A,0xAAA3}; 
  443. pascal OSErr MakeThumbnailFromPictureFile(short refNum,short colorDepth,
  444.  PicHandle thumbnail,ProgressProcRecordPtr progressProc)
  445.  = {0x702B,0xAAA3}; 
  446. pascal OSErr MakeThumbnailFromPixMap(PixMapHandle src,Rect *srcRect,short colorDepth,
  447.  PicHandle thumbnail,ProgressProcRecordPtr progressProc)
  448.  = {0x702C,0xAAA3}; 
  449. pascal OSErr TrimImage(ImageDescriptionHandle desc,Ptr inData,long inBufferSize,
  450.  DataProcRecordPtr dataProc,Ptr outData,long outBufferSize,FlushProcRecordPtr flushProc,
  451.  Rect *trimRect,ProgressProcRecordPtr progressProc)
  452.  = {0x702D,0xAAA3}; 
  453. pascal OSErr ConvertImage(ImageDescriptionHandle srcDD,Ptr srcData,short colorDepth,
  454.  CTabHandle clut,CodecQ accuracy,CodecQ quality,CodecType cType,CodecComponent codec,
  455.  ImageDescriptionHandle dstDD,Ptr dstData)
  456.  = {0x7030,0xAAA3}; 
  457. pascal OSErr MakeDitherTable(GDHandle gdev,DTabHandle *ditherTable)
  458.  = {0x7031,0xAAA3}; 
  459. pascal OSErr DisposeDitherTable(DTabHandle ditherTable)
  460.  = {0x7032,0xAAA3}; 
  461. pascal OSErr GetCompressedPixMapInfo(PixMapPtr pix,ImageDescriptionHandle *desc,
  462.  Ptr *data,long *bufferSize,DataProcRecord *dataProc,ProgressProcRecord *progressProc)
  463.  = {0x7037,0xAAA3}; 
  464. pascal OSErr SetCompressedPixMapInfo(PixMapPtr pix,ImageDescriptionHandle desc,
  465.  Ptr data,long bufferSize,DataProcRecordPtr dataProc,ProgressProcRecordPtr progressProc)
  466.  = {0x7038,0xAAA3}; 
  467. pascal OSErr TransformRgn(MatrixRecord *mp,RgnHandle r)
  468.  = {0x7039,0xAAA3};
  469. #ifdef __cplusplus
  470. }
  471. #endif
  472. enum {
  473.  identityMatrix  = 0x00,                             /* result if matrix is identity */
  474.  translateMatrix  = 0x01,                             /* result if matrix translates */
  475.  scaleMatrix   = 0x02,                                 /* result if matrix scales */
  476.  linearMatrix  = 0x04,                                 /* result if matrix is general 2 x 2 */
  477.  perspectiveMatrix = 0x06                             /* result if matrix is general 3 x 3 */
  478. };
  479. typedef unsigned char MatrixFlags;
  480.  
  481.  
  482. #ifdef __cplusplus
  483. extern "C" {
  484. #endif
  485. pascal short GetMatrixType(MatrixRecord *m)
  486.  = {0x7014,0xABC2}; 
  487. pascal void CopyMatrix(MatrixRecord *m1,MatrixRecord *m2)
  488.  = {0x7020,0xABC2}; 
  489. pascal Boolean EqualMatrix(MatrixRecord *m1,MatrixRecord *m2)
  490.  = {0x7021,0xABC2}; 
  491. pascal void SetIdentityMatrix(MatrixRecord *matrix)
  492.  = {0x7015,0xABC2}; 
  493. pascal void TranslateMatrix(MatrixRecord *m,Fixed deltaH,Fixed deltaV)
  494.  = {0x7019,0xABC2}; 
  495. pascal void TranslateMatrixTo(MatrixRecord *m,Fixed deltaH,Fixed deltaV)
  496.  = {0x701A,0xABC2}; 
  497. pascal void RotateMatrix(MatrixRecord *m,Fixed degrees,Fixed aboutX,Fixed aboutY)
  498.  = {0x7016,0xABC2}; 
  499. pascal void ScaleMatrix(MatrixRecord *m,Fixed scaleX,Fixed scaleY,Fixed aboutX,
  500.  Fixed aboutY)
  501.  = {0x7017,0xABC2}; 
  502. pascal void SkewMatrix(MatrixRecord *m,Fixed skewX,Fixed skewY,Fixed aboutX,
  503.  Fixed aboutY)
  504.  = {0x7018,0xABC2}; 
  505. pascal OSErr TransformFixedPoints(MatrixRecord *m,FixedPoint *fpt,long count)
  506.  = {0x7022,0xABC2}; 
  507. pascal OSErr TransformPoints(MatrixRecord *mp,Point *pt1,long count)
  508.  = {0x7023,0xABC2}; 
  509. pascal Boolean TransformFixedRect(MatrixRecord *m,FixedRect *fr,FixedPoint *fpp)
  510.  = {0x7024,0xABC2}; 
  511. pascal Boolean TransformRect(MatrixRecord *m,Rect *r,FixedPoint *fpp)
  512.  = {0x7025,0xABC2}; 
  513. pascal Boolean InverseMatrix(MatrixRecord *m,MatrixRecord *im)
  514.  = {0x701C,0xABC2}; 
  515. pascal void ConcatMatrix(MatrixRecord *a,MatrixRecord *b)
  516.  = {0x701B,0xABC2}; 
  517. pascal void RectMatrix(MatrixRecord *matrix,Rect *srcRect,Rect *dstRect)
  518.  = {0x701E,0xABC2}; 
  519. pascal void MapMatrix(MatrixRecord *matrix,Rect *fromRect,Rect *toRect)
  520.  = {0x701D,0xABC2}; 
  521. pascal void AlignMatrix(MatrixRecord *mrp,Rect *srcRect)
  522.  = {0x701F,0xABC2}; 
  523. #ifdef __cplusplus
  524. }
  525. #endif
  526.  
  527. #endif
  528.